home *** CD-ROM | disk | FTP | other *** search
/ Champak Vol E-12 / (Vol E-12) May 21 2012.iso / Animations / dj / dj.swf / scripts / __Packages / mx / skins / halo / ButtonSkin.as next >
Text File  |  2012-05-21  |  7KB  |  115 lines

  1. class mx.skins.halo.ButtonSkin extends mx.skins.RectBorder
  2. {
  3.    static var symbolName = "ButtonSkin";
  4.    static var symbolOwner = mx.skins.halo.ButtonSkin;
  5.    var className = "ButtonSkin";
  6.    var backgroundColorName = "buttonColor";
  7.    static var classConstructed = mx.skins.halo.ButtonSkin.classConstruct();
  8.    static var UIObjectExtensionsDependency = mx.core.ext.UIObjectExtensions;
  9.    function ButtonSkin()
  10.    {
  11.       super();
  12.    }
  13.    function init()
  14.    {
  15.       super.init();
  16.    }
  17.    function size()
  18.    {
  19.       this.drawHaloRect(this.__get__width(),this.__get__height());
  20.    }
  21.    function drawHaloRect(w, h)
  22.    {
  23.       var _loc6_ = this.getStyle("borderStyle");
  24.       var _loc4_ = this.getStyle("themeColor");
  25.       var _loc5_ = this._parent.emphasized;
  26.       this.clear();
  27.       switch(_loc6_)
  28.       {
  29.          case "falseup":
  30.             if(_loc5_)
  31.             {
  32.                this.drawRoundRect(this.__get__x(),this.__get__y(),w,h,5,9542041,100);
  33.                this.drawRoundRect(this.__get__x(),this.__get__y(),w,h,5,_loc4_,75);
  34.                this.drawRoundRect(this.__get__x() + 1,this.__get__y() + 1,w - 2,h - 2,4,[3355443,16777215],85,0,"radial");
  35.                this.drawRoundRect(this.__get__x() + 2,this.__get__y() + 2,w - 4,h - 4,3,[0,14342874],100,0,"radial");
  36.                this.drawRoundRect(this.__get__x() + 2,this.__get__y() + 2,w - 4,h - 4,3,_loc4_,75);
  37.                this.drawRoundRect(this.__get__x() + 3,this.__get__y() + 3,w - 6,h - 6,2,16777215,100);
  38.                this.drawRoundRect(this.__get__x() + 3,this.__get__y() + 4,w - 6,h - 7,2,16316664,100);
  39.             }
  40.             else
  41.             {
  42.                this.drawRoundRect(0,0,w,h,5,9542041,100);
  43.                this.drawRoundRect(1,1,w - 2,h - 2,4,[13291985,16250871],100,0,"radial");
  44.                this.drawRoundRect(2,2,w - 4,h - 4,3,[9542041,13818586],100,0,"radial");
  45.                this.drawRoundRect(3,3,w - 6,h - 6,2,16777215,100);
  46.                this.drawRoundRect(3,4,w - 6,h - 7,2,16316664,100);
  47.             }
  48.             break;
  49.          case "falsedown":
  50.             this.drawRoundRect(this.__get__x(),this.__get__y(),w,h,5,9542041,100);
  51.             this.drawRoundRect(this.__get__x() + 1,this.__get__y() + 1,w - 2,h - 2,4,[3355443,16579836],100,0,"radial");
  52.             this.drawRoundRect(this.__get__x() + 1,this.__get__y() + 1,w - 2,h - 2,4,_loc4_,50);
  53.             this.drawRoundRect(this.__get__x() + 2,this.__get__y() + 2,w - 4,h - 4,3,[0,14342874],100,0,"radial");
  54.             this.drawRoundRect(this.__get__x(),this.__get__y(),w,h,5,_loc4_,40);
  55.             this.drawRoundRect(this.__get__x() + 3,this.__get__y() + 3,w - 6,h - 6,2,16777215,100);
  56.             this.drawRoundRect(this.__get__x() + 3,this.__get__y() + 4,w - 6,h - 7,2,_loc4_,20);
  57.             break;
  58.          case "falserollover":
  59.             this.drawRoundRect(this.__get__x(),this.__get__y(),w,h,5,9542041,100);
  60.             this.drawRoundRect(this.__get__x(),this.__get__y(),w,h,5,_loc4_,50);
  61.             this.drawRoundRect(this.__get__x() + 1,this.__get__y() + 1,w - 2,h - 2,4,[3355443,16777215],100,0,"radial");
  62.             this.drawRoundRect(this.__get__x() + 2,this.__get__y() + 2,w - 4,h - 4,3,[0,14342874],100,0,"radial");
  63.             this.drawRoundRect(this.__get__x() + 2,this.__get__y() + 2,w - 4,h - 4,3,_loc4_,50);
  64.             this.drawRoundRect(this.__get__x() + 3,this.__get__y() + 3,w - 6,h - 6,2,16777215,100);
  65.             this.drawRoundRect(this.__get__x() + 3,this.__get__y() + 4,w - 6,h - 7,2,16316664,100);
  66.             break;
  67.          case "falsedisabled":
  68.             this.drawRoundRect(0,0,w,h,5,13159628,100);
  69.             this.drawRoundRect(1,1,w - 2,h - 2,4,15921906,100);
  70.             this.drawRoundRect(2,2,w - 4,h - 4,3,13949401,100);
  71.             this.drawRoundRect(3,3,w - 6,h - 6,2,15921906,100);
  72.             break;
  73.          case "trueup":
  74.             this.drawRoundRect(this.__get__x(),this.__get__y(),w,h,5,10066329,100);
  75.             this.drawRoundRect(this.__get__x() + 1,this.__get__y() + 1,w - 2,h - 2,4,[3355443,16579836],100,0,"radial");
  76.             this.drawRoundRect(this.__get__x() + 1,this.__get__y() + 1,w - 2,h - 2,4,_loc4_,50);
  77.             this.drawRoundRect(this.__get__x() + 2,this.__get__y() + 2,w - 4,h - 4,3,[0,14342874],100,0,"radial");
  78.             this.drawRoundRect(this.__get__x(),this.__get__y(),w,h,5,_loc4_,40);
  79.             this.drawRoundRect(this.__get__x() + 3,this.__get__y() + 3,w - 6,h - 6,2,16777215,100);
  80.             this.drawRoundRect(this.__get__x() + 3,this.__get__y() + 4,w - 6,h - 7,2,16250871,100);
  81.             break;
  82.          case "truedown":
  83.             this.drawRoundRect(this.__get__x(),this.__get__y(),w,h,5,10066329,100);
  84.             this.drawRoundRect(this.__get__x() + 1,this.__get__y() + 1,w - 2,h - 2,4,[3355443,16579836],100,0,"radial");
  85.             this.drawRoundRect(this.__get__x() + 1,this.__get__y() + 1,w - 2,h - 2,4,_loc4_,50);
  86.             this.drawRoundRect(this.__get__x() + 2,this.__get__y() + 2,w - 4,h - 4,3,[0,14342874],100,0,"radial");
  87.             this.drawRoundRect(this.__get__x(),this.__get__y(),w,h,5,_loc4_,40);
  88.             this.drawRoundRect(this.__get__x() + 3,this.__get__y() + 3,w - 6,h - 6,2,16777215,100);
  89.             this.drawRoundRect(this.__get__x() + 3,this.__get__y() + 4,w - 6,h - 7,2,_loc4_,20);
  90.             break;
  91.          case "truerollover":
  92.             this.drawRoundRect(this.__get__x(),this.__get__y(),w,h,5,9542041,100);
  93.             this.drawRoundRect(this.__get__x(),this.__get__y(),w,h,5,_loc4_,50);
  94.             this.drawRoundRect(this.__get__x() + 1,this.__get__y() + 1,w - 2,h - 2,4,[3355443,16777215],100,0,"radial");
  95.             this.drawRoundRect(this.__get__x() + 1,this.__get__y() + 1,w - 2,h - 2,4,_loc4_,40);
  96.             this.drawRoundRect(this.__get__x() + 2,this.__get__y() + 2,w - 4,h - 4,3,[0,14342874],100,0,"radial");
  97.             this.drawRoundRect(this.__get__x() + 2,this.__get__y() + 2,w - 4,h - 4,3,_loc4_,40);
  98.             this.drawRoundRect(this.__get__x() + 3,this.__get__y() + 3,w - 6,h - 6,2,16777215,100);
  99.             this.drawRoundRect(this.__get__x() + 3,this.__get__y() + 4,w - 6,h - 7,2,16316664,100);
  100.             break;
  101.          case "truedisabled":
  102.             this.drawRoundRect(0,0,w,h,5,13159628,100);
  103.             this.drawRoundRect(1,1,w - 2,h - 2,4,15921906,100);
  104.             this.drawRoundRect(2,2,w - 4,h - 4,3,13949401,100);
  105.             this.drawRoundRect(3,3,w - 6,h - 6,2,15921906,100);
  106.       }
  107.    }
  108.    static function classConstruct()
  109.    {
  110.       mx.core.ext.UIObjectExtensions.Extensions();
  111.       _global.skinRegistry.ButtonSkin = true;
  112.       return true;
  113.    }
  114. }
  115.